<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>涨停天梯</title>
</head>

<body>
<h3 style="text-align: center; margin: 20px 0;"><%= Time.now.strftime("%Y-%m-%d") %> 连板天梯</h3>
<p style="text-align: center; margin-bottom: 20px;">点赞+收藏+关注。是我创作的动力</p>
<table class="stock-table">
  <thead>
  <tr>
    <th>股票名称</th>
    <th>连板</th>
    <th>今年</th>
    <th>涨停原因</th>
  </tr>
  </thead>
  <tbody>
  <% @limit_lists.each do |limit_list|%>
    <tr>
      <td><%= limit_list.name %></td>
      <td><%= limit_list.limit_times %></td>
      <td><%= limit_list.year_count %></td>
      <td><%= limit_list.reason %></td>
    </tr>
  <% end %>
  </tbody>
</table>
<style>
    body {
        font-family: Arial, sans-serif;
        background-color: #ffebeb; /* 浅红色背景 */
    }

    .stock-table {
        width: 80%;
        margin: 20px auto;
        border-collapse: collapse;
        border: 1px solid #ff4d4d; /* 红色边框 */
    }

    .stock-table th,
    .stock-table td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 10px;
        text-align: center;
        border: 1px solid #ff4d4d; /* 红色边框 */
    }

    .stock-table th {
        background-color: #ff4d4d; /* 红色表头背景 */
        color: white;
    }

    .stock-table tr:nth-child(even) {
        background-color: #ffd6d6; /* 偶数行浅红色背景 */
    }

    .stock-table tr:hover {
        background-color: #ffb3b3; /* 鼠标悬停时的背景颜色 */
    }
</style>
</body>

</html>
